<template>
<div class="content profile">
  <header class="bar bar-nav">
    <a class="button button-link button-nav pull-left" v-link="{path: '/user', replace: true}">
    <span class="icon icon-left"></span>
    </a>
    <h1 class="title">个人助理</h1>
  </header>
  <div class="list-block">
    <ul style="margin-top:.5rem;">
      <li>
        <div class="item-content">
            <div class="item-inner">
                <div class="item-title label">姓名</div>
                <div class="item-input">
                    <input id="name" type="text" name="name" placeholder="姓名" readonly="true"  v-bind:value="assist.name">
                </div>
            </div>
        </div>
      </li>
      <li>
        <div class="item-content">
            <div class="item-inner">
                <div class="item-title label">邮箱</div>
                <div class="item-input">
                    <input id="name" type="text" name="name" placeholder="邮箱" v-bind:value="assist.email"  readonly="true" >
                </div>
            </div>
        </div>
      </li>
      <li>
        <div class="item-content">
            <div class="item-inner">
                <div class="item-title label">电话</div>
                <div class="item-input">
                    <input id="name" type="text" name="name" placeholder="电话" v-bind:value="assist.phone" readonly="true" >
                </div>
            </div>
        </div>
      </li>
      
      <li>
          <div class="item-content">
              <div class="item-inner">
                  <div class="item-title label">微信账号</div>
                  <div class="item-input">
                      <input id="age" type="text" name="age" placeholder="微信账号" v-bind:value="assist.wxid" readonly="true" >
                  </div>
              </div>
          </div>
      </li>
      <li v-if="assist.wxcode != null">    
        <img   v-bind:src="assist.wxcode" style="{width: 100%, display: block;}">
      </li>
    </ul>
  </div>
  
</div>
</template>
<script>
export default {
  data () {
    return {
      assist: {},
      apiUrl: 'http://creatgo.com/oec/member?method=asssitinfo&uid='
    }
  },
  route: {
    data () {
      console.log(this.apiUrl)
      console.log(this.$route.query.uid)
      this.$http.get(this.apiUrl + this.$route.query.uid).
      then(function(response) {
        this.$set('assist', response.json().assist)
      })
    }
  }
}
</script>

<style >
.profile .list-block {
  margin: 2.4rem 0 1rem 0;
  font-size: .65rem;
}
.profile .list-block .item-subtitle {
  font-size: .65rem;
}
.profile .list-block .item-input {
  margin-top: .06rem;
  margin-bottom: .06rem;
}
.profile .list-block input {
  font-size: .65rem;
}
.profile .list-block select {
  font-size: .65rem;
}
.profile .list-block textarea {
  font-size: .65rem;
}
.profile .list-block .item-title.label  {
  width: 30%;
}
.profile .submit-button {
  margin: 0 auto 2rem auto;
  width: 100%;
  padding: 0 .45rem;
}
.profile .submit-button button {
  background-color: #19b586;
  width: 100%;
  line-height: 2.1rem !important;
  height: 2.1rem !important;
}
img{
  width:100%;
}
</style>
